package com.itfitness.mchart.activity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.hyphenate.easeui.EaseConstant;
import com.hyphenate.easeui.ui.EaseChatFragment;
import com.itfitness.mchart.R;

public class ChartActivity extends BaseActivity {

    @Override
    protected int LayoutRes() {
        return R.layout.activity_chart;
    }

    @Override
    protected boolean isHaveTitle() {
        return false;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EaseChatFragment easeChatFragment = new EaseChatFragment();
        Bundle bundle = new Bundle();
        bundle.putString(EaseConstant.EXTRA_USER_ID,getIntent().getStringExtra(EaseConstant.EXTRA_USER_ID));
        bundle.putInt(EaseConstant.EXTRA_CHAT_TYPE,getIntent().getIntExtra(EaseConstant.EXTRA_CHAT_TYPE,EaseConstant.CHATTYPE_SINGLE));
        easeChatFragment.setArguments(bundle);
        getSupportFragmentManager().beginTransaction().replace(R.id.activity_chart_container,easeChatFragment).commit();
    }
}
